package br.mestrado.unb.bs.model.sensor;

import br.mestrado.unb.bs.model.constant.DataPackageConstant;


/**
 * Pacote do acelerometro
 * @author paula
 */
public class AccPayload extends Payload{

	private byte x;
	private byte y;
	private byte z;
	
	public byte getX() {
		return x;
	}
	public void setX(byte x) {
		this.x = x;
	}
	public byte getY() {
		return y;
	}
	public void setY(byte y) {
		this.y = y;
	}
	public byte getZ() {
		return z;
	}
	public void setZ(byte z) {
		this.z = z;
	}
	
	public byte[] toByteStream(){
		byte[] stream = new byte[getSize()];
		stream[0] = x;
		stream[1] = y;
		stream[2] = z;
		return stream;
	}
	@Override
	public byte getSize() {
		return DataPackageConstant.acc_payload_size;
	}
	@Override
	public byte getCategory() {
		return DataPackageConstant.acc_category;
	}
	
}
